package com.sc.nft.enums;

public enum SendSMSEnum {

    REGISTER(1, "注册"),

    FORGOT_PASSWORD(2, "忘记密码"),

    CHANGE_PASSWORD(3, "修改密码"),

    SETUP_PAY_PASSWORD(4, "设置支付密码"),

    UPDATE_PAY_PASSWORD(5, "修改支付密码"),

    WALLET_PAY(6, "钱包支付"),

    WITHDRAW(7, "提现"),

    TRANSFER(8, "转赠"),

    OPERATING_BALANCE(9, "后台操作用户钱包余额"),
    ACCOUNT_CANCELLATION(10, "账号注销"),
    NECK(11, "公司浙商活动使用"),
    LOGIN_BY_USER_TEL(13, "手机号验证码登录"),
    ;

    private Integer code;
    private String name;

    SendSMSEnum(Integer code, String name) {
        this.code = code;
        this.name = name;
    }

    public static String getValue(Integer code) {
        SendSMSEnum[] values = values();
        for (SendSMSEnum v : values) {
            if (v.getCode().equals(code)) {
                return v.getName();
            }
        }
        return null;
    }

    public static Integer getTypeCode(String name) {
        SendSMSEnum[] values = values();
        for (SendSMSEnum v : values) {
            if (v.getName().equals(name)) {
                return v.getCode();
            }
        }
        return null;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}
